From: cl349@firebug.cl.cam.ac.uk Date: Tue, 13 Sep 2005 16:57:45 +0000 (+0000) Subject: Fix domain list build/cleanup code with xend subdirectory. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16806^2~35 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d0b30dab401c0ef4f76d36c0f4deb60e549fac77;p=xen.git Fix domain list build/cleanup code with xend subdirectory. Signed-off-by: Christian Limpach --- diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 2748905cd0..4c7f8250af 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -130,8 +130,11 @@ class XendDomain: doms = self.xen_domains() self.dbmap.readDB() for domdb in self.dbmap.values(): + if not domdb.has_key("xend"): + continue + db = domdb.addChild("xend") try: - domid = int(domdb.id) + domid = int(db.id) except: domid = None # XXX if domid in self.domains, then something went wrong @@ -139,7 +142,7 @@ class XendDomain: domdb.delete() elif domid in doms: try: - self._new_domain(domdb['uuid'], domdb, doms[domid]) + self._new_domain(db.uuid, db, doms[domid]) except Exception, ex: log.exception("Error recreating domain info: id=%d", domid) self._delete_domain(domid) @@ -204,8 +207,11 @@ class XendDomain: eserver.inject('xend.domain.died', [info.name, info.id]) # XXX this should not be needed for domdb in self.dbmap.values(): + if not domdb.has_key("xend"): + continue + db = domdb.addChild("xend") try: - domid = int(domdb.id) + domid = int(db.id) except: domid = None if (domid is None) or (domid == id):